import request from '@/utils/request'

// 查询原料列表
export function listRaw(query) {
  return request({
    url: '/dishes/raw/list',
    method: 'get',
    params: query
  })
}

// 查询原料详细
export function getRaw(rawId) {
  return request({
    url: '/dishes/raw/' + rawId,
    method: 'get'
  })
}

// 新增原料
export function addRaw(data) {
  return request({
    url: '/dishes/raw',
    method: 'post',
    data: data
  })
}

// 修改原料
export function updateRaw(data) {
  return request({
    url: '/dishes/raw',
    method: 'put',
    data: data
  })
}

// 删除原料
export function delRaw(rawId) {
  return request({
    url: '/dishes/raw/' + rawId,
    method: 'delete'
  })
}
